generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 7
chore: Remove ResizeObserver polyfill #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
just-boris
merged 2 commits into
cloudscape-design:main
from
TrevorBurnham:remove-resize-observer-polyfill
Sep 16, 2025
Merged
chore: Remove ResizeObserver polyfill #154
just-boris
merged 2 commits into
cloudscape-design:main
from
TrevorBurnham:remove-resize-observer-polyfill
Sep 16, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TrevorBurnham
added a commit
to TrevorBurnham/cloudscape-components
that referenced
this pull request
Aug 24, 2025
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary. This change reduces bundle size and simplifies the codebase. Changes: - Remove @juggle/resize-observer from package.json dependencies - Update sticky scrollbar hook to use native ResizeObserver - Add global ResizeObserver mock in Jest setup for JSDOM compatibility - Update mock file to use native ResizeObserver types with JSDOM-compatible implementations Note that the mock file can be removed once the polyfill is also removed from @cloudscape-design/component-toolkit: cloudscape-design/component-toolkit#154
TrevorBurnham
added a commit
to TrevorBurnham/cloudscape-components
that referenced
this pull request
Sep 2, 2025
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary. This change reduces bundle size and simplifies the codebase. Changes: - Remove @juggle/resize-observer from package.json dependencies - Update sticky scrollbar hook to use native ResizeObserver - Add global ResizeObserver mock in Jest setup for JSDOM compatibility - Update mock file to use native ResizeObserver types with JSDOM-compatible implementations Note that the mock file can be removed once the polyfill is also removed from @cloudscape-design/component-toolkit: cloudscape-design/component-toolkit#154
just-boris
pushed a commit
to cloudscape-design/components
that referenced
this pull request
Sep 10, 2025
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary. This change reduces bundle size and simplifies the codebase. Changes: - Remove @juggle/resize-observer from package.json dependencies - Update sticky scrollbar hook to use native ResizeObserver - Add global ResizeObserver mock in Jest setup for JSDOM compatibility - Update mock file to use native ResizeObserver types with JSDOM-compatible implementations Note that the mock file can be removed once the polyfill is also removed from @cloudscape-design/component-toolkit: cloudscape-design/component-toolkit#154
just-boris
pushed a commit
to TrevorBurnham/cloudscape-components
that referenced
this pull request
Sep 10, 2025
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary. This change reduces bundle size and simplifies the codebase. Changes: - Remove @juggle/resize-observer from package.json dependencies - Update sticky scrollbar hook to use native ResizeObserver - Add global ResizeObserver mock in Jest setup for JSDOM compatibility - Update mock file to use native ResizeObserver types with JSDOM-compatible implementations Note that the mock file can be removed once the polyfill is also removed from @cloudscape-design/component-toolkit: cloudscape-design/component-toolkit#154
fb10a87 to
ccc1652
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
==========================================
- Coverage 99.32% 98.77% -0.56%
==========================================
Files 36 36
Lines 893 900 +7
Branches 247 239 -8
==========================================
+ Hits 887 889 +2
- Misses 6 11 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ccc1652 to
873c8a8
Compare
just-boris
pushed a commit
to TrevorBurnham/cloudscape-components
that referenced
this pull request
Sep 11, 2025
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary. This change reduces bundle size and simplifies the codebase. Changes: - Remove @juggle/resize-observer from package.json dependencies - Update sticky scrollbar hook to use native ResizeObserver - Add global ResizeObserver mock in Jest setup for JSDOM compatibility - Update mock file to use native ResizeObserver types with JSDOM-compatible implementations Note that the mock file can be removed once the polyfill is also removed from @cloudscape-design/component-toolkit: cloudscape-design/component-toolkit#154
873c8a8 to
451b348
Compare
All target browsers now support native ResizeObserver API, making the polyfill unnecessary. This change reduces bundle size and simplifies the codebase. Changes: - Remove @juggle/resize-observer dependency from package.json - Replace polyfill imports with native ResizeObserver API - Update useResizeObserver to use getBoundingClientRect() for initial sync measurement - Add convertElementToEntry() helper since native ResizeObserverEntry cannot be constructed - Remove __mocks__/@juggle/resize-observer.ts mock file - Add comprehensive Jest mocks for ResizeObserver and getBoundingClientRect in test environment - Extract ResizeObserver test mocks to separate reusable module
451b348 to
8239fba
Compare
just-boris
approved these changes
Sep 16, 2025
avinashbot
approved these changes
Sep 16, 2025
This was referenced Sep 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary: https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#browser_compatibility
This change reduces bundle size and simplifies the codebase.
Changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.